package com.bdqn.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bdqn.mapper.FinanceMapper;
import com.bdqn.model.CustomerBaseInfo;
import com.bdqn.model.IndividualAccount;
import com.bdqn.model.Users;
import com.bdqn.service.FinanceService;

@Service("financeService")
public class FinanceServiceImpl implements FinanceService{
	//财务mapper
	@Autowired
	private FinanceMapper financeMapper;
	
	@Override
	public List<CustomerBaseInfo> selectUser(String name) {
		List<CustomerBaseInfo> user=financeMapper.selectUser(name);
		return user;
	}

	@Override
	public boolean idExits(String userName) {
		int row=financeMapper.idExits(userName);
		if(row == 1) {
			return true;
		}
		return false;
	}


	@Override	
	public boolean state(String userName) {
		int row=financeMapper.state(userName);
		if(row == 1 ) {
			return true;
		}
		return false;
	}

	@Override
	public IndividualAccount queryBalance(String userName) {
		IndividualAccount balance=financeMapper.queryBalance(userName);
		return balance;
	}

}
